package gx.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="t_store")
public class Store {
	@javax.persistence.Id
	@GeneratedValue
	private Integer id;
	private Integer num;//仓库商品的数量
//	private Date store_date;
	//
//@OneToMany(mappedBy = "store")
//@JsonIgnore
//private List<Product> prodList = new ArrayList<Product>();

	
//库存到商品的一对多
@ManyToOne
@JoinColumn(name="prod_id")
private Product product;

//todo
//@OneToMany
//@JoinColumn(name="purc_id")
//	private Purchase purchase;


public Product getProduct() {
	return product;
}

public Integer getId() {
	return id;
}

public void setId(Integer id) {
	this.id = id;
}

public void setProduct(Product product) {
	this.product = product;
}

public Integer getNum() {
	return num;
}

public void setNum(Integer num) {
	this.num = num;
}

//public List<Product> getProdList() {
//	return prodList;
//}
//
//public void setProdList(List<Product> prodList) {
//	this.prodList = prodList;
//}

//public Date getStore_date() {
//	return store_date;
//}
//
//public void setStore_date(Date store_date) {
//	this.store_date = store_date;
//}

//public Product getProduct() {
//	return product;
//}
//
//public void setProduct(Product product) {
//	this.product = product;
//}
//
//public Purchase getPurchase() {
//	return purchase;
//}
//
//public void setPurchase(Purchase purchase) {
//	this.purchase = purchase;
//}


}
